<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm(validateForm.value)">
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>姓名</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback nzValidatingTip="Validating..." [nzErrorTip]="Name">
      <input nz-input formControlName="Name" placeholder="请输入姓名" />
      <ng-template #Name let-control>
        <ng-container *ngIf="control.hasError('required')">
          请输入姓名
        </ng-container>
        <ng-container *ngIf="control.hasError('duplicated')">
          The username is redundant!
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>学历</nz-form-label>
    <nz-radio-group style="display: inline-block; width: 235px; height: 42px; margin: 0 0 12px;" formControlName="Education">
      <label nz-radio nzValue="大专">大专</label>
      <label nz-radio nzValue="本科">本科</label>
      <label nz-radio nzValue="硕士">硕士</label>
      <label nz-radio nzValue="博士">博士</label>
    </nz-radio-group>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>应聘岗位</nz-form-label>
   
    <nz-select formControlName="JobId" style="display: inline-block; width: 235px; height: 42px; margin: 0 0 12px;"  >
      <nz-option *ngFor="let item of allJobs" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
    </nz-select>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>电话</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback nzValidatingTip="Validating..." [nzErrorTip]="Tel">
      <input nz-input formControlName="Tel" placeholder="请输入电话" />
      <ng-template #Tel let-control>
        <ng-container *ngIf="control.hasError('required')">
          请输入电话
        </ng-container>
        <ng-container *ngIf="control.hasError('duplicated')">
          The username is redundant!
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>E-mail</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback [nzErrorTip]="Email">
      <input nz-input formControlName="Email" placeholder="email" type="email" />
      <ng-template #Email let-control>
        <ng-container *ngIf="control.hasError('email')">
          The input is not valid E-mail!
        </ng-container>
        <ng-container *ngIf="control.hasError('required')">
          Please input your E-mail!
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>信息来源</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback nzValidatingTip="Validating..." [nzErrorTip]="ApplyType">
      <input nz-input formControlName="InfoSource" placeholder="请输入信息来源" />
      <ng-template #ApplyType let-control>
        <ng-container *ngIf="control.hasError('required')">
          请输入信息来源
        </ng-container>
        <ng-container *ngIf="control.hasError('duplicated')">
          The InfoSource is redundant!
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>
  

  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>应聘类型</nz-form-label>

    <nz-radio-group style="display: inline-block; width: 235px; height: 42px; margin: 0 0 12px;" formControlName="ApplyType" >
     
      <label nz-radio nzValue="1">校招</label>
      <label nz-radio nzValue="2">社招</label>
      <label nz-radio nzValue="3">猎头</label>
    </nz-radio-group>"
    <!-- <nz-form-control [nzSpan]="12" nzHasFeedback nzValidatingTip="Validating..." [nzErrorTip]="ApplyType">
      <input nz-input formControlName="ApplyType" placeholder="请输入学校" />
      <ng-template #ApplyType let-control>
        <ng-container *ngIf="control.hasError('required')">
          请输入毕业学校
        </ng-container>
        <ng-container *ngIf="control.hasError('duplicated')">
          The username is redundant!
        </ng-container>
      </ng-template>
    </nz-form-control> -->
  </nz-form-item>
  
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>上传简历</nz-form-label>
    <nz-form-control [nzSpan]="12" nzHasFeedback nzValidatingTip="Validating..." >
    <nz-upload
      nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
      [nzHeaders]="{ authorization: 'authorization-text' }"
      (nzChange)="handleChange($event)"
    >
      <button nz-button (click)="submitFile($event)"><i nz-icon nzType="upload"></i>上传简历</button>
    </nz-upload>
      <ng-template let-control>
          <ng-container *ngIf="control.hasError('required')">
            请上传简历
          </ng-container>
          <ng-container *ngIf="control.hasError('duplicated')">
            The username is redundant!
          </ng-container>
        </ng-template>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-control [nzOffset]="7" [nzSpan]="12">
      <button nz-button type="submit" nzType="primary" >Submit</button>
      <button nz-button (click)="resetForm($event)">Reset</button>
    </nz-form-control>
  </nz-form-item>
</form>

